package panel;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.TableCellRenderer;

public class CustomTableHeaderRenderer extends JLabel implements TableCellRenderer {

	
	public CustomTableHeaderRenderer(){
		

		setOpaque(true);
		setBackground(new Color(155,187,88));
		setForeground(Color.white);
		setBorder(BorderFactory.createMatteBorder(0, 0, 2, 1, Color.white));
		
		
		setHorizontalAlignment(SwingConstants.CENTER);
		setFont(new Font("Tahoma",1,12));
		
		Dimension d = this.getPreferredSize();
		setPreferredSize(new Dimension(d.width,23));
		
	}

	private static final long serialVersionUID = 1L;
	public Component getTableCellRendererComponent(JTable table, Object value,
			boolean isSelected, boolean hasFocus, int row, int col) {

		
		
		if (isSelected) {}

		if (hasFocus) {}

		setText(value.toString());

		return this;
	}

	// The following methods override the defaults for performance reasons
	public void validate() {}
	public void revalidate() {}
	protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {}
	public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {}
	
	

}